#include "HDRLightsDemo.hpp"

#include <math.h>
#include <stdlib.h>

//! Setting static variable handling pointer to HDRLightsDemo instance.
static HDRLightsDemo* demo = 0;

//! Static method called to cleanup when application is destroyed.
//! TODO: Move initialization of demo and GLUT to the application
//! main function. Deleting then should be performed inside 
//! 'int main(...,...)' and ExitFunction no longer used.
void ExitFunction( void )
{
	delete demo;
}

//! Main function where HDRLightsDemo is being created and (in future)
//! will be initialized and deleted.
int main(int argc, char **argv)
{
	//! Registering callback function.
	atexit( ExitFunction );

	demo = new HDRLightsDemo( argc, argv );

	glutMainLoop();
	return 0;
}